<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title><@g_site code="blog">${site.name}</@g_site></title>
    <link rel="stylesheet" href="/webjars/bootstrap/3.4.1/css/bootstrap.css">
    <script src="/webjars/jquery/1.11.1/jquery.min.js"></script>
    <script src="/webjars/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }
    body {
        background-color: #3d3d3d;
    }
    .cms-header {
        width: 100%;
        height: 52px;
        background-color: #3d3d3d;
        border: #080808 1px solid;
    }

    .navbar-inverse {
        background-color: #3d3d3d;
    }
    .list-group-item-heading {
        color: #ffffff;
    }
    .media-body, .pull-left {
        color: #999999;
    }
</style>
<div class="cms-header">
    <nav class="container navbar navbar-inverse navbar-static-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/api/cms" style="color: #ff800a"><@g_site code="blog">${site.name}</@g_site></a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <form class="navbar-form navbar-right">
                    <div class="form-group">
                        <input id="searchArticle" type="text" class="form-control" placeholder="搜索">
                    </div>
                    <button onclick="onSubmit()" type="submit" class="btn btn-default">搜索</button>
                </form>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
</div>

<script>
    function onSubmit() {
        var url = "/api/cms/article/list/" + $("#searchArticle").val()
        window.open(url)
    }
</script>